//
//  PACardBoard.m
//  PAMobileWallet
//
//  Created by Pay_SMP002 on 13-7-10.
//  Copyright (c) 2013年 平安付. All rights reserved.
//

#import "PACardBoard.h"

@implementation PACardBoard

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        self.backgroundColor = [UIColor clearColor];

        items = [[NSMutableArray alloc] initWithCapacity:3];

        scrollView = [[UIScrollView alloc] initWithFrame:self.bounds];
        scrollView.pagingEnabled = YES;
        [self addSubview:scrollView];

        CGSize size = frame.size;
        CGFloat x, y, w, h;
        CGFloat space = 10;
        
        w = 210;
        h = 120;
        y = (size.height - h) / 2;
        x = (size.width - w) / 2;
        PABankCard *addCard = [[PABankCard alloc] initWithFrame:CGRectMake(x, y, w, h)];
        [addCard setBankCardImage:[UIImage imageNamed:@"account_card1"]];
        [addCard setMode:BANKCARDMODE_Line];
        [items addObject:addCard];
        [scrollView addSubview:addCard];

    }
    return self;
}



@end
